{% extends 'org-base.html' %}    
{% block right_content  %}
<div class="right companycenter layout" >
  <div class="head">
      <h1>机构课程</h1>
  </div>
  <div class="brief group_list">
    {% for course in all_course.object_list  %}
    <div class="module1_5 box">
      <a class="comp-img-box" href="course-detail.html">
        <img width="214" height="195" src="{{ course.image.url }}"/>
      </a>
      <div class="des">
        <a href="course-detail.html"><h2>{{ course.name }}</h2></a>
        <span class="fl">课时：<i class="key">{{ course.learn_time }}</i></span>
        <span class="fr">学习人数: {{ course.learn_num }}</span>
      </div>
      <div class="bottom">
        <span class="fl">{{ course.organization.name }}</span>
         <span class="star fr  notlogin
            " data-favid="13" data-fav-type="4">
            {{ course.fav_num }}
        </span>
      </div>
    </div>
    {% endfor %}
  </div>

  <!-- fenyeqi  -->
  <div class="pageturn">
    <ul class="pagelist">
      {% if all_course.has_previous %}
      <li class="long">
        <a href="?{{ all_course.previous_page_number.querystring }}" class="prev">last page</a>
      </li>
      {% endif %}

      {% for page in all_course.pages %}
      {% if page %}
      {% if page == all_course.number %}
      <li class="active"><a href="?{{ page.querystring }}" class="page">{{ page }}</a> </li>
      {% else %}
      <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
      {% endif %}
      {% else %}
      <li class="none"><a href="">...</a></li>
      {% endif %}
      {% endfor %}
      {% if all_course.has_next %}
      <li class="long"><a href="?{{ all_course.next_page_number.querystring }}">next page</a></li>
        {% endif %}
    </ul>
  </div>
</div>
{% endblock %}
